<template>
	<view>
		<!-- <nav-bar
		:leftSet="leftSet"
		:rightSet="rightSet"
		:middleSet="middleSet"
		background-color="#6899F7"
		status-bar="true"
		fixed="true"/> -->
		<custom-content :height="height">
			<nav-click 
				:navData="navList.navData" 
				:width="navList.width" 
				:navHeight="navList.navHeight" 
				:clickColor="navList.clickColor"
				:fSize="navList.fSize"
				:bagc="navList.bagc"
				 @navClick="navClick"/>
			
			<dropdown :list="list" @onClick="onClick" />
			<text v-if="conBoole">确定在此</text>
			<text v-if="canBoole">取消在此</text>
		</custom-content>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				height:0,
				navList:{
					navData:['小智','维森特','poto','小胡'],
					width:90,
					navHeight:80,
					clickColor:"red",
					fSize:"30",
					bagc:"pink"
				},
				
				list:['5秒','10秒','20秒'],
				conBoole:false,
				canBoole:false,
				
			}
		},
		methods: {
			back(){
				this.$funs.show("left",0)
			},
			metu(){
				this.$funs.show("right",0)
			},
			navClick(e){
				let that = this;
				switch (e){
					case 0:
						this.$funs.show("成功状态",1)
						break;
					case 1:
						this.$funs.show("提示状态",0)
						break;
					case 2:
						this.$funs.show("等待状态",2)
						break;
					case 3:
						const conFun = ()=>{
							that.conBoole = true;
							that.canBoole = false;
							console.log("aaaaaaaaaa")
						}
						const canFun = ()=>{
							that.conBoole = false;
							that.canBoole = true;
							console.log("bbbbbbbbbb")
						}
						this.$funs.showM({title:'提示标题',content:'提示内容'},conFun,canFun)
						
						
						
						
						break;
					default:
						break;
				}
			},
			// conFun(){
			// 	this.$funs.show("我是确定",0)
			// },
			// canFun(){
			// 	this.$funs.show("我是取消",0)
			// },
			onClick(e){
				
				if(e==0)return this.time(5)
				if(e==1)return this.time(10)
				if(e==2)return this.time(20)
				
			},
			time(val){
				
				var that = this;
				var a =val;
				
					
					var i =setInterval(()=>{
						
						if(a==0  ){
							clearInterval(i)
							
							return 	
						}
						that.$funs.show(`${a}`,2,0)
						a--
					},1000)
				
				
			}
			
		}
	}
</script>

<style>

</style>
